package com.zxy.dept.controller;

import com.zxy.config.annotation.Doc;
import com.zxy.config.annotation.NoAuthorization;
import com.zxy.dept.domain.Department;
import com.zxy.dept.service.DepartmentService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/dept")
public class DepartmentController {

    @Resource
    private DepartmentService departmentService;

    @RequestMapping(value = "/menu",method = RequestMethod.GET)
    @NoAuthorization
    @Doc(doc = "查询所有部门")
    public List<Department> findAllMenu(){
        return departmentService.findAllMenu();
    }
}
